package com.nft.service.school.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nft.paging.Paginator;
import com.nft.po.NftResponse;
import com.nft.service.school.dto.BookContentDto;
import com.nft.service.school.dto.BookDetailDto;
import com.nft.service.school.entity.BookEntity;
import com.nft.service.school.req.BookReq;
import com.nft.service.school.req.UserBookReq;
import com.nft.service.school.resp.BookResp;
import com.nft.service.school.resp.SysUserResp;
import com.nft.service.school.resp.UserBookDetailResp;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface BookManagerService extends IService<BookEntity> {
    public NftResponse<List<String>> getGrade();
    public NftResponse<List<String>> getSubject();
    public NftResponse<List<String>> getDispart();

    public NftResponse<Paginator<BookResp>> getBookList(@RequestBody BookReq query);

    public NftResponse<BookResp> getBookInfoById(Long id);

    public NftResponse<List<BookDetailDto>> getBookDetailInfoById(Long id);
    public NftResponse<List<BookContentDto>> getBookDetailJxInfoById(Long id, String jxkey);
    public NftResponse<Boolean> saveWorkPhone(HttpServletRequest request, MultipartFile file);

    public NftResponse<Paginator<BookResp>> getBookInfos(@RequestParam("userId") Long userId,
                                                         @RequestParam("pageNo") Integer pageNo,
                                                         @RequestParam("pageSize") Integer pageSize);

    public NftResponse<Boolean> putBookInfo(@RequestBody UserBookReq query);

    public NftResponse<List<String>> getClassInfos(@RequestParam("userId") Long userId);

    public NftResponse<Boolean> putClassInfo(@RequestParam("userId") Long userId, @RequestParam("classId") Long classId);
    public NftResponse<Boolean> putUsername(@RequestParam("userId") Long userId, @RequestParam("userName") String userName);
    public String putAvatar(HttpServletRequest request, MultipartFile file);
    public Boolean putOpenId(@RequestParam("phonenumber") String phonenumber, @RequestParam("openId") String openId);

    public NftResponse<SysUserResp> getUserInfo(@RequestParam("openId") String openId);
    public NftResponse<List<UserBookDetailResp>> getErrorQ(@RequestParam("taskId") Long taskId, @RequestParam("userId") Long userId, @RequestParam("status") String status);
}
